﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HQHS.Library.Common.Caching
{
    public class CachedItemInfo<TKey, TValue>
    {
        public TValue Value;
        public DateTime LastRefreshTimestamp;
        public DateTime LastRequestedTimestamp;
        public bool IsLoaded;
        public readonly TKey Key;

        public CachedItemInfo(TKey key)
        {
            this.Key = key;
            this.LastRefreshTimestamp = DateTime.MinValue;
        }
        public CachedItemInfo(TKey key, TValue value, DateTime timestamp)
        {
            this.Key = key;
            this.Value = value;
            this.LastRefreshTimestamp = timestamp;
        }
    }
}
